<template>
  <div id="mine">
    <router-link to="/mypage"
      ><van-nav-bar title="我的二维码" left-arrow fixed class="van-nav-bar"
    /></router-link>
    <!-- 二维码 -->
    <div class="qr">
      <vue-qr
        :logo-src="logoSrc"
        :size="200"
        :margin="0"
        :auto-color="true"
        :dot-scale="1"
        :text="appSrc"
      />
    </div>
  </div>
</template>

<script>
import VueQr from "vue-qr";
export default {
  data() {
    return {
      logoSrc: "",
      appSrc: ``,
    };
  },
  components: {
    VueQr,
  },
};
</script>

<style scoped>
/* 使用id穿透加组件虚拟DOM树设置标签样式 */
#mine /deep/ .van-icon,
#mine /deep/ .van-nav-bar__title {
  color: white !important;
}
.van-nav-bar {
  background-color: rgba(88, 133, 185, 0.767);
}
.qr {
  text-align: center;
  margin-top: 5rem;
}
</style>